package net.tuandn.training.lesson.flexjson;

import java.util.ArrayList;

import net.tuandn.training.model.City;
import flexjson.JSONDeserializer;

public class FlexDeserializer {
	public static void main(String[] args) {
		String jsonString = DataManager.getJsonCities();
		System.out.println("Json String to deserialize: " + jsonString);
		ArrayList<City> obj2 = new JSONDeserializer<ArrayList<City>>().use("values", City.class).deserialize(jsonString);
		System.out.println("Result: " + obj2.get(0).getName());
	}
}
